export interface ResponseData {
  code: number
  ok: boolean
  message: string
}

export interface orderDetail {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    orderStatusString: string
  }
  userId: number
  outTradeNo: string
  hoscode: string
  hosname: string
  depcode: string
  depname: string
  scheduleId: string
  title: string
  reserveDate: string
  reserveTime: number
  patientId: number
  patientName: string
  patientPhone: string
  hosRecordId: string
  number: number
  fetchTime: string
  fetchAddress: string
  amount: number
  quitTime: string
  orderStatus: number
}

export interface OrderDetailResponse extends ResponseData {
  data: orderDetail
}

export interface SearchParams {
  page: number
  limit: number
  userId?: number
  patientId?: number
  orderStatus?: number
  outTradeNo?: string
  keyword?: string
  createTimeBegin?: string
  createTimeEnd?: string
}

export type OrderList = orderDetail[]

export interface OrderListResponse extends ResponseData {
  data: {
    records: OrderList
    total: number
    size: number
    current: number
    hitCount: boolean
    searchCount: boolean
    pages: number
  }
}

export interface PayResponse extends ResponseData {
  data: {
    codeUrl: string
    orderId: number
    resultCode: string
    totalFee: number
  }
}

export interface OrderStatus {
  comment: string
  status: number
}

export interface OrderStatusListResponse extends ResponseData {
  data: OrderStatus[]
}
